home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Freesoft 1997 May
/
Freesoft_1997-05_cd.bin
/
inzer
/
minolta
/
drivers
/
WL400
/
W3.1 disk 1
/
MSCPYDIS.IN_
/
MSCPYDIS.IN
Wrap
Text File
|
1994-12-06
|
6KB
|
201 lines
CONST CDALREADYUSED = 7100
CONST CDBADFILE = 7200
CONST CDCONFIRMINFO = 7300
CONST CDGETNAME = 7400
CONST CDGETNAMEORG = 7500
CONST CDGETORG = 7600
CONST CDBADNAME = 7700
CONST CDBADORG = 7800
DECLARE FUNCTION FInitSystem1 LIB "mscpydis.dll" (did%, sz$, fNet%) AS INTEGER
DECLARE FUNCTION FInitSystem3 LIB "mscpydis.dll" (did%, sz$, fAlways%) AS INTEGER
DECLARE FUNCTION FCloseSystem LIB "mscpydis.dll" (szSect$, szKey$, szDst$, wResType%, wResId%) AS INTEGER
DECLARE FUNCTION InitSystemRead (did%, sz$, fNet%) AS INTEGER
DECLARE FUNCTION InitSystemWrite (did%, sz$, fAlways%) AS INTEGER
DECLARE SUB CloseSystem (szSect$, szKey$, szDst$, wResType%, wResId%)
DECLARE FUNCTION InitSystem (did%, sz$, fNet%, szHelpProc$) AS INTEGER
DECLARE FUNCTION InitSystemDlgs (fNet%, szHelpProc$) AS INTEGER
DECLARE SUB BadNameOrg(dlg%, HelpDlg%, szHelpProc$)
DECLARE FUNCTION NameOrgOkay (dlg%, szName$, szOrg$, HelpDlg%, szHelpProc$) AS INTEGER
FUNCTION InitSystemRead (did%, sz$, fNet%) STATIC AS INTEGER
InitSystemRead = FInitSystem1(did%, sz$, fNet%)
END FUNCTION
FUNCTION InitSystemWrite (did%, sz$, fAlways%) STATIC AS INTEGER
InitSystemWrite = FInitSystem3(did%, sz$, fAlways%)
END FUNCTION
SUB CloseSystem (szSect$, szKey$, szDst$, wResType%, wResId%) STATIC
IF FCloseSystem (szSect$, szKey$, szDst$, wResType%, wResId%) = 0 THEN
ERROR STFERR
END IF
END SUB
FUNCTION InitSystem (did%, sz$, fNet%, szHelpProc$) STATIC AS INTEGER
IF InitSystemRead(did%, sz$, fNet%) = 0 THEN
InitSystem = 0
ELSEIF InitSystemDlgs(fNet%, szHelpProc$) = 0 THEN
InitSystem = 0
ELSEIF InitSystemWrite(did%, sz$, 0) = 0 THEN
InitSystem = 0
ELSE
InitSystem = 1
END IF
END FUNCTION
FUNCTION InitSystemDlgs (fNet%, szHelpProc$) STATIC AS INTEGER
fOkay% = 0
szName$ = GetSymbolValue(SYM_NAME$)
szOrg$ = GetSymbolValue(SYM_ORG$)
sz$ = MID$(GetSymbolValue(SYM_TYPE$), 1, 1)
IF sz$ = "N" THEN
IF fNet <> 0 THEN
GOTO ISDN1
ELSE
GOTO ISDN2
END IF
ELSEIF (sz$ = "U") OR (sz$ = "O") THEN
GOTO ISDU
ELSEIF sz$ = "W" THEN
GOTO ISDA
ELSE
GOTO ISDB
END IF
ISDN1:
SetSymbolValue SYM_EDITTEXTIN$, ""
SetSymbolValue SYM_EDITFOCUS$, ""
ISDN1L1:
sz$ = UIStartDlg(DLL_CUIDLL$, CDGETORG, "FEditDlgProc", APPHELP, szHelpProc$)
IF sz$ = BTN_CONTINUE$ THEN
szOrg$ = RTRIM$(LTRIM$(GetSymbolValue(SYM_EDITOUT$)))
IF szOrg$ = "" THEN
BadNameOrg CDBADORG, APPHELP, "FHelpDlgProc"
GOTO ISDN1L1
END IF
IF NameOrgOkay(CDCONFIRMINFO, szOrg$, "", HELP_CDCONFIRMINFO, szHelpProc$) = 0 THEN
GOTO ISDN1L1
END IF
SetSymbolValue SYM_ORG$, szOrg$
fOkay% = 1
ELSEIF sz$ = VAL_REACTIVATE$ THEN
GOTO ISDN1L1
elseif sz$ = BTN_EXIT$ then
DoAskQuit
goto ISDN1L1
elseif sz$ = BTN_CANCEL$ then
goto ISDN1L1
ELSE
SetSymbolValue SYM_TYPE$, VAL_ERROR$
END IF
UIPop 1
GOTO ISDEND
ISDN2:
sz$ = UIStartDlg(DLL_CUIDLL$, CDGETNAMEORG, "FNameOrgDlgProc", HELP_CDGETNAMEORG, szHelpProc$)
IF sz$ = BTN_OK$ THEN
szName$ = RTRIM$(LTRIM$(GetSymbolValue(SYM_NAMEOUT$)))
szOrg$ = RTRIM$(LTRIM$(GetSymbolValue(SYM_ORGOUT$)))
IF szName$ = "" THEN
BadNameOrg CDBADNAME, APPHELP, szHelpProc$
GOTO ISDN2
END IF
IF szOrg$ = "" THEN
szOrg$ = " "
END IF
IF NameOrgOkay(CDCONFIRMINFO, szName$, szOrg$, HELP_CDCONFIRMINFO, szHelpProc$) = 0 THEN
GOTO ISDN2
END IF
SetSymbolValue SYM_NAME$, szName$
SetSymbolValue SYM_ORG$, szOrg$
fOkay% = 1
elseif sz$ = BTN_EXIT$ then
DoAskQuit
goto ISDN2
elseif sz$ = BTN_CANCEL$ then
goto ISDN2
ELSE
SetSymbolValue SYM_TYPE$, VAL_ERROR$
END IF
UIPop 1
GOTO ISDEND
ISDU:
fOkay% = NameOrgOkay(CDALREADYUSED, szName$, szOrg$, HELP_LEGAL, szHelpProc$)
GOTO ISDEND
ISDA:
SetSymbolValue SYM_EDITTEXTIN$, ""
SetSymbolValue SYM_EDITFOCUS$, ""
ISDAL1:
sz$ = UIStartDlg(DLL_CUIDLL$, CDGETNAME, "FEditDlgProc", APPHELP, szHelpProc$)
IF sz$ = BTN_CONTINUE$ THEN
szName$ = RTRIM$(LTRIM$(GetSymbolValue(SYM_EDITOUT$)))
IF szName$ = "" THEN
BadNameOrg CDBADNAME, APPHELP, "FHelpDlgProc"
GOTO ISDAL1
END IF
IF NameOrgOkay(CDCONFIRMINFO, szName$, "", HELP_CDCONFIRMINFO, szHelpProc$) = 0 THEN
GOTO ISDAL1
END IF
SetSymbolValue SYM_NAME$, szName$
fOkay% = 1
ELSEIF sz$ = VAL_REACTIVATE$ THEN
GOTO ISDAL1
elseif sz$ = BTN_EXIT$ then
DoAskQuit
goto ISDAL1
elseif sz$ = BTN_CANCEL$ then
goto ISDAL1
ELSE
SetSymbolValue SYM_TYPE$, VAL_ERROR$
END IF
UIPop 1
GOTO ISDEND
ISDB:
FInitInfoDialog
sz$ = UIStartDlg(DLL_CUIDLL$, CDBADFILE, "FInfoDlgProc", APPHELP, szHelpProc$)
IF sz$ = BTN_CONTINUE$ THEN
fOkay% = 1
elseif sz$ = BTN_EXIT$ then
DoAskQuit
goto ISDB
elseif sz$ = BTN_CANCEL$ then
goto ISDB
END IF
UIPop 1
GOTO ISDEND
ISDEND:
InitSystemDlgs = fOkay%
szName$ = ""
szOrg$ = ""
sz$ = ""
END FUNCTION
SUB BadNameOrg(dlg%, HelpDlg%, szHelpProc$) STATIC
DIM bDoBadNameOrg
bDoBadNameOrg = TRUE
WHILE bDoBadNameOrg
FInitInfoDialog
sz$ = UIStartDlg(DLL_CUIDLL$, dlg%, "FInfoDlgProc", HelpDlg%, szHelpProc$)
IF sz$ = BTN_OK$ THEN
bDoBadNameOrg = FALSE
ELSEIF sz$ = BTN_EXIT$ THEN
DoAskQuit
END IF
WEND
UIPop 1
sz$ = ""
END SUB
FUNCTION NameOrgOkay (dlg%, szName$, szOrg$, HelpDlg%, szHelpProc$) STATIC AS INTEGER
DIM bDoNameOrgOK%
RemoveSymbol SYM_CONFIRMTEXTIN$
AddListItem SYM_CONFIRMTEXTIN$, szName$
AddListItem SYM_CONFIRMTEXTIN$, szOrg$
bDoNameOrgOK = TRUE
WHILE bDoNameOrgOK
sz$ = UIStartDlg(DLL_CUIDLL$, dlg%, "FConfirmDlgProc", HelpDlg%, szHelpProc$)
IF sz$ = BTN_CONTINUE$ THEN
NameOrgOkay = 1
bDoNameOrgOK = FALSE
ELSEIF (sz$ = BTN_BACK_G$) OR (sz$ = BTN_CANCEL$) THEN
NameOrgOkay = 0
bDoNameOrgOK = FALSE
ELSEIF sz$ = BTN_EXIT$ THEN
DoAskQuit
END IF
WEND
UIPop 1
sz$ = ""
END FUNCTION